package com.zwb.mongostudy.config;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.autoconfigure.mongo.MongoProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.Map;

/**
 * Description:
 * Copyright: (c) 2022 SunTime Co'Ltd Inc. All rights reserved.<br/>
 *
 * @author zhongwb
 * @version 1.0
 * @date 2025/03/27 10:17
 * @since JDK11
 */

@Setter
@Getter
@ConfigurationProperties(prefix = "data.mongodb")
public class MultipleDataSourcesProperties {

    /**
     * 默认数据源
     */
    private String defaultDataSource;

    /**
     * 模板名称前缀
     */
    private String templateNameSuffix = "";

    /**
     * 多数据源配置
     */
    @NestedConfigurationProperty
    private Map<String, MongoProperties> multipleDataSources;


}
